package com.dotndot.momserver.data;

import java.util.*;

import javax.jdo.annotations.*;

import com.google.appengine.api.datastore.*;

@PersistenceCapable( identityType = IdentityType.APPLICATION )
public class User
{
    @PrimaryKey
    @Persistent( valueStrategy = IdGeneratorStrategy.IDENTITY )
    private Long index;

    @Persistent
    private Email email;

    @Persistent
    private String password;

    @Persistent
    private Date date;

    @Persistent
    private String nickname;

    @Persistent
    private Date birthday;

    @Persistent
    private String gender;

    @Persistent
    private Blob avatar;

    @Persistent
    private boolean terms;

    @Persistent
    private String country;

    @Persistent
    private List<Long> babys;

    @Persistent
    private List<Long> friends;

    public User( Email email, String password, String gender, String nickName, Date birthday, boolean terms, Date date )
    {
        setEmail(email);
        setPassword(password);
        setGender(gender);
        setNickname(nickName);
        setBirthday(birthday);
        setTerms(terms);
        setCountry("KOR");
        setDate(date);        
    }

    public void setIndex( Long index )
    {
        this.index = index;
    }

    public Long getIndex()
    {
        return index;
    }

    public void setEmail( Email email )
    {
        this.email = email;
    }

    public Email getEmail()
    {
        return email;
    }

    public void setPassword( String password )
    {
        this.password = password;
    }

    public String getPassword()
    {
        return password;
    }

    public void setDate( Date date )
    {
        this.date = date;
    }

    public Date getDate()
    {
        return date;
    }

    public void setNickname( String nickname )
    {
        this.nickname = nickname;
    }

    public String getNickname()
    {
        return nickname;
    }

    public void setBirthday( Date birthday )
    {
        this.birthday = birthday;
    }

    public Date getBirthday()
    {
        return birthday;
    }

    public void setGender( String gender )
    {
        this.gender = gender;
    }

    public String getGender()
    {
        return gender;
    }

    public void setAvatar( Blob avatar )
    {
        this.avatar = avatar;
    }

    public Blob getAvatar()
    {
        return avatar;
    }

    public void setTerms( boolean terms )
    {
        this.terms = terms;
    }

    public boolean getTerms()
    {
        return terms;
    }

    public void setBabys( List<Long> babys )
    {
        this.babys = babys;
    }

    public List<Long> getBabys()
    {
        return babys;
    }

    public void setFriends( List<Long> friends )
    {
        this.friends = friends;
    }

    public List<Long> getFriends()
    {
        return friends;
    }

    public void setCountry( String country )
    {
        this.country = country;
    }

    public String getCountry()
    {
        return country;
    }
}
